<!DOCTYPE html>
<html>
<head>
    <title>测试Shenhe API</title>
</head>
<body>
    <h1>测试Shenhe API</h1>
    <button onclick="testDirect()">直接测试lilishop模块</button>
    <button onclick="testGateway()">通过网关测试</button>
    <div id="result"></div>

    <script>
        function testDirect() {
            fetch('http://localhost:9204/dianpu/shenhe/list?pageNum=1&pageSize=10')
                .then(response => response.json())
                .then(data => {
                    document.getElementById('result').innerHTML = '<h3>直接访问结果:</h3><pre>' + JSON.stringify(data, null, 2) + '</pre>';
                })
                .catch(error => {
                    document.getElementById('result').innerHTML = '<h3>直接访问错误:</h3><pre>' + error.message + '</pre>';
                });
        }

        function testGateway() {
            fetch('http://localhost:8080/dianpu/shenhe/list?pageNum=1&pageSize=10')
                .then(response => response.json())
                .then(data => {
                    document.getElementById('result').innerHTML = '<h3>网关访问结果:</h3><pre>' + JSON.stringify(data, null, 2) + '</pre>';
                })
                .catch(error => {
                    document.getElementById('result').innerHTML = '<h3>网关访问错误:</h3><pre>' + error.message + '</pre>';
                });
        }
    </script>
</body>
</html> 